package com.ljc.dao;

import com.ljc.entity.ProjectPlanningReview;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ProjectPlanningReviewDao {

    @Insert("insert into project_planning_review(opinion,result,date,auditor,project_planning_id) " +
            "values(#{opinion},#{result},#{date},#{auditor},#{projectPlanningId})")
    void add(ProjectPlanningReview projectPlanningReview);

    @Select("select * from project_planning_review where project_planning_id=#{projectPlanningId}")
    List<ProjectPlanningReview> getByProjectPlanningId(int projectPlanningId);
}
